package com.android.lovely.room.search

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey
import com.android.lovely.user.UserManager
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass

/**
 *
 * @author why
 * @date 2025/3/13 14:34
 */
@Entity(tableName = "Search")
@JsonClass(generateAdapter = true)
data class SearchEntity(
    @PrimaryKey(autoGenerate = false) @ColumnInfo(name = "search_key") @Json(name = "search_key") var key: String = "",
    @ColumnInfo(name = "owner_id") @Json(name = "owner_id") val ownerId: Int = UserManager.authId,
    @ColumnInfo(name = "update_time") @Json(name = "update_time") val updateTime: Long = System.currentTimeMillis(),
)